package com.pro.service.imple;

import com.pro.dao.UserFeedbackMapper;
import com.pro.entity.LoginRecord;
import com.pro.entity.UserFeedback;
import com.pro.service.UserFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserFeedbackServiceImple implements UserFeedbackService {
    @Autowired
    private UserFeedbackMapper userFeedbackMapper;

    @Override
    public List<UserFeedback> getTable(Integer page, Integer limit, Integer gid) {
        List<UserFeedback> table = userFeedbackMapper.getTable(page, limit, gid);
        return table;
    }

    @Override
    public int getCounts(Integer gid) {
        int counts = userFeedbackMapper.getCounts(gid);
        return counts;
    }

    @Override
    public List<UserFeedback> queryFeedback(Integer userId, Integer feedbackType, Integer feedbackClassification, String createDate) {
        return userFeedbackMapper.queryFeedback(userId,feedbackType,feedbackClassification,createDate);
    }

    @Override
    public List<UserFeedback> queryToBeReviewed(Integer feedbackStatus) {
        return userFeedbackMapper.queryToBeReviewed(feedbackStatus);
    }

    @Override
    public Integer getToBeReviewedNum() {
        Integer toBeReviewedNum = userFeedbackMapper.getToBeReviewedNum();
        return toBeReviewedNum;
    }

    @Override
    public List<UserFeedback> queryAccepted(Integer feedbackStatus) {
        return userFeedbackMapper.queryAccepted(feedbackStatus);
    }

    @Override
    public Integer getAcceptedNum() {
        return userFeedbackMapper.getAcceptedNum();
    }

    @Override
    public boolean updateAccepted(Integer feedbackId) {

        return userFeedbackMapper.updateAccepted(feedbackId);
    }

    @Override
    public boolean del(Integer feedbackId) {
        return userFeedbackMapper.del(feedbackId);
    }
}
